package selfStudy.demo2.iotest.domain;

public class Student1 {
    private String name;
    private String age;
    private String gender;
    private String sorce;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Student1 student1 = (Student1) o;

        if (name != null ? !name.equals(student1.name) : student1.name != null) return false;
        if (age != null ? !age.equals(student1.age) : student1.age != null) return false;
        if (gender != null ? !gender.equals(student1.gender) : student1.gender != null) return false;
        return sorce != null ? sorce.equals(student1.sorce) : student1.sorce == null;
    }

    @Override
    public int hashCode() {
        int result = name != null ? name.hashCode() : 0;
        result = 31 * result + (age != null ? age.hashCode() : 0);
        result = 31 * result + (gender != null ? gender.hashCode() : 0);
        result = 31 * result + (sorce != null ? sorce.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "Student1{" +
                "name='" + name + '\'' +
                ", age='" + age + '\'' +
                ", gender='" + gender + '\'' +
                ", sorce='" + sorce + '\'' +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getSorce() {
        return sorce;
    }

    public void setSorce(String sorce) {
        this.sorce = sorce;
    }

    public Student1(String name, String age, String gender, String sorce) {
        this.name = name;
        this.age = age;
        this.gender = gender;
        this.sorce = sorce;
    }

    public Student1() {
    }
}
